Authentication
Apart from the web interface, edexa.com's blockchain stamping functionality is also possible through an API interaction. In order to get access to our API please create an account.
tip
TESTNET BASEURL
https://api-edexagw.io-world.com/bstamp/v2
Authenticate User
POST authenticate
The following endpoint is used in order to authenticate with our service. For security reasons, the registered user will receive a client id and secret key which will be used in order to authenticate.
If you are alraedy registered you can get your api credentials :
https://accounts.io-world.com
client-id is
required
.secret-key is
required
.The Authorization token will be
valid
for7 days
.
POST: Autheticate User
cURL
curl --location -g --request POST 'https://api-edexagw.io-world.com/bstamp/v2/authenticate' \
--header 'client-id: <CLIENT ID>' \
--header 'secret-key: <SECRET KEY>'
Parameters
Key | Value/Type | Description |
---|---|---|
clientId | 67809********************8 | An string |
Secret key | 789zbh**************8 | An string |
Responses
200: OK
{
"status": 200,
"message": "Logged in successfully",
"data": {
"token": "eyJhbG***********.eyJzdWIiOiJVMkZzZE***********************",
"_id": "6135*************",
"name": "John Doe",
"username": "John",
"email": "j*****@gmail.com",
"status": 1,
"profilePicture": "",
"loginType": "social",
"refreshToken": "eyJhbG***********.eyJzdWIiOiJVMkZzZE*****************",
"viewType": 0,
"watermark": 0,
"align": "top"
}
}
404: Not Found
{
"status": 404,
"message": "User Not Found"
}
500: Not Found
{
"status": 500,
"message": "Something went wrong, please try again"
}
Enroll User
POST enroll-user
- External user must enrolled with blockchain to get public address
- In response user will get public address
- You have to pass your
Bearer Token
via the Authorization parameter through the headers.
Enroll User
cURL
curl --location -g --request POST 'https://api-edexagw.io-world.com/bstamp/v2/enroll-user' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{
"userId": "16308************"
}'
Parameters
Key | Value/Type | Type | Description |
---|---|---|---|
userId | 789zbh**************8 | String | Id of user, to whom you want to enroll in bstamp |
Responses
200: Success
{
"status": 201,
"message": "User enrolled successfully",
"data": {
"publicAddress": "0x7b16F411d**********",
"userId": "cb611d17-****-*********-****"
}
}
401: Unauthorized
{
"status": 401,
"message": "Invalid auth token"
}
500:Internal Server Error
{
"status": 500,
"message": "Something went wrong, please try again"
}
Update Account Settings
PUT account-preference
- To edit watermark and alignment of e-signature in file stamp.
- You have to pass your
Bearer Token
via the Authorization parameter through the headers.
Enroll User
cURL
curl --location -g --request PUT '{{bstamp_url}}v2/account-preference' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{
"watermark": 1,
"align": "bottom"
}'
Parameters
Key | Value/Type | Type | Description |
---|---|---|---|
watermark | 1 | Number | 0 or 1 (0 to turn off watermark and 1 for adding watermark) |
align | top | String | top: to add watermark in top of stamp and bottom to have proof at bottom |
Responses
200: Success
{
"status": 200,
"message": "User preference updated successfully"
}
401: Unauthorized
{
"status": 401,
"message": "Invalid auth token"
}
500:Internal Server Error
{
"status": 500,
"message": "Something went wrong, please try again"
}